﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using QL_LichCT.Entities;

namespace QL_LichCT.DataLayer
{
	class View_CoLichTCDAL
	{
        public static List<View_CoLichTC> GetListByCB(string maCB)
        {
            DataAccessHelper db = new DataAccessHelper();

            string sql = string.Format("select * from View_CoLichTC where macb = '{0}'", maCB);
            DataTable dt = db.GetDataTable(sql);

            List<View_CoLichTC> list = new List<View_CoLichTC>();

            foreach (DataRow row in dt.Rows)
                list.Add(new View_CoLichTC(row));
            return list;
        }
	}
}
